package com.hxrfid.system.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hxrfid.common.core.domain.BaseEntity;
import com.hxrfid.common.core.validate.AddGroup;
import com.hxrfid.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 租户信息业务对象
 *
 * @author ruoyi
 * @date 2022-11-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class SysTenantBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 租户编码
     */
    private Long tenantId;

    /**
     * 租户名称
     */
    @NotBlank(message = "租户名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tenantName;

    /**
     * 地址
     */
    private String address;

    /**
     * 电话
     */
    @NotBlank(message = "电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phone;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空", groups = { AddGroup.class, EditGroup.class })
    private String email;

    /**
     * 有效截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "有效截止时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date activeTime;

    /**
     * 状态
     */
    @NotNull(message = "是否激活不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer activeFlag;

    /**
     * 模板ID
     */
    @NotNull(message = "模板ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long tempId;

    /**
     * 行政区域编码
     */
    private String regionCodes;

    /**
     * 租户管理员账号
     */
    private String account;

    /**
     * 对应的用户id
     */
    private Long userId;

}
